3.1.45 \(\int \frac {x^2 (d+e x)}{b x+c x^2} \, dx\)

Optimal. Leaf size=45 \[ -\frac {b (c d-b e) \log (b+c x)}{c^3}+\frac {x (c d-b e)}{c^2}+\frac {e x^2}{2 c} \]

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 45, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.050, Rules used = {765} \begin {gather*} \frac {x (c d-b e)}{c^2}-\frac {b (c d-b e) \log (b+c x)}{c^3}+\frac {e x^2}{2 c} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(x^2*(d + e*x))/(b*x + c*x^2),x]

[Out]

((c*d - b*e)*x)/c^2 + (e*x^2)/(2*c) - (b*(c*d - b*e)*Log[b + c*x])/c^3

Rule 765

Int[((e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[Expand
Integrand[(e*x)^m*(f + g*x)*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, e, f, g, m}, x] && IntegerQ[p] && (
GtQ[p, 0] || (EqQ[a, 0] && IntegerQ[m]))

Rubi steps

\begin {align*} \int \frac {x^2 (d+e x)}{b x+c x^2} \, dx &=\int \left (\frac {c d-b e}{c^2}+\frac {e x}{c}+\frac {b (-c d+b e)}{c^2 (b+c x)}\right ) \, dx\\ &=\frac {(c d-b e) x}{c^2}+\frac {e x^2}{2 c}-\frac {b (c d-b e) \log (b+c x)}{c^3}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 41, normalized size = 0.91 \begin {gather*} \frac {c x (-2 b e+2 c d+c e x)+2 b (b e-c d) \log (b+c x)}{2 c^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(x^2*(d + e*x))/(b*x + c*x^2),x]

[Out]

(c*x*(2*c*d - 2*b*e + c*e*x) + 2*b*(-(c*d) + b*e)*Log[b + c*x])/(2*c^3)

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {x^2 (d+e x)}{b x+c x^2} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[(x^2*(d + e*x))/(b*x + c*x^2),x]

[Out]

IntegrateAlgebraic[(x^2*(d + e*x))/(b*x + c*x^2), x]

________________________________________________________________________________________

fricas [A]  time = 0.39, size = 47, normalized size = 1.04 \begin {gather*} \frac {c^{2} e x^{2} + 2 \, {\left (c^{2} d - b c e\right )} x - 2 \, {\left (b c d - b^{2} e\right )} \log \left (c x + b\right )}{2 \, c^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(e*x+d)/(c*x^2+b*x),x, algorithm="fricas")

[Out]

1/2*(c^2*e*x^2 + 2*(c^2*d - b*c*e)*x - 2*(b*c*d - b^2*e)*log(c*x + b))/c^3

________________________________________________________________________________________

giac [A]  time = 0.15, size = 49, normalized size = 1.09 \begin {gather*} \frac {c x^{2} e + 2 \, c d x - 2 \, b x e}{2 \, c^{2}} - \frac {{\left (b c d - b^{2} e\right )} \log \left ({\left | c x + b \right |}\right )}{c^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(e*x+d)/(c*x^2+b*x),x, algorithm="giac")

[Out]

1/2*(c*x^2*e + 2*c*d*x - 2*b*x*e)/c^2 - (b*c*d - b^2*e)*log(abs(c*x + b))/c^3

________________________________________________________________________________________

maple [A]  time = 0.05, size = 52, normalized size = 1.16 \begin {gather*} \frac {e \,x^{2}}{2 c}+\frac {b^{2} e \ln \left (c x +b \right )}{c^{3}}-\frac {b d \ln \left (c x +b \right )}{c^{2}}-\frac {b e x}{c^{2}}+\frac {d x}{c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(e*x+d)/(c*x^2+b*x),x)

[Out]

1/2*e*x^2/c-1/c^2*x*b*e+d*x/c+b^2/c^3*ln(c*x+b)*e-b/c^2*ln(c*x+b)*d

________________________________________________________________________________________

maxima [A]  time = 0.89, size = 46, normalized size = 1.02 \begin {gather*} \frac {c e x^{2} + 2 \, {\left (c d - b e\right )} x}{2 \, c^{2}} - \frac {{\left (b c d - b^{2} e\right )} \log \left (c x + b\right )}{c^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(e*x+d)/(c*x^2+b*x),x, algorithm="maxima")

[Out]

1/2*(c*e*x^2 + 2*(c*d - b*e)*x)/c^2 - (b*c*d - b^2*e)*log(c*x + b)/c^3

________________________________________________________________________________________

mupad [B]  time = 1.02, size = 46, normalized size = 1.02 \begin {gather*} x\,\left (\frac {d}{c}-\frac {b\,e}{c^2}\right )+\frac {e\,x^2}{2\,c}+\frac {\ln \left (b+c\,x\right )\,\left (b^2\,e-b\,c\,d\right )}{c^3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^2*(d + e*x))/(b*x + c*x^2),x)

[Out]

x*(d/c - (b*e)/c^2) + (e*x^2)/(2*c) + (log(b + c*x)*(b^2*e - b*c*d))/c^3

________________________________________________________________________________________

sympy [A]  time = 0.19, size = 37, normalized size = 0.82 \begin {gather*} \frac {b \left (b e - c d\right ) \log {\left (b + c x \right )}}{c^{3}} + x \left (- \frac {b e}{c^{2}} + \frac {d}{c}\right ) + \frac {e x^{2}}{2 c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*(e*x+d)/(c*x**2+b*x),x)

[Out]

b*(b*e - c*d)*log(b + c*x)/c**3 + x*(-b*e/c**2 + d/c) + e*x**2/(2*c)

________________________________________________________________________________________